<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>jquery01</title>
	<meta name="author" content="Stark" />
	<!-- Date: 2018-10-23 -->
	<style type="text/css">
		.bg {
			background: #f00;
			color: #fff;
		}
	</style>
	<script type="text/javascript" src="jquery-1.8.3.js"></script>
	<script type="text/javascript">
		$(function(){
			// $("li.abc").css("color","#f00");
			// $("#hello ul li:even").css("background","#00f"),css("color","#fff");
			$("li").mouseover(setColor).mouseout(setColor);
			function setColor() {
				$(this).toggleClass("bg");
			}
		});
	</script>
</head>
<body>
<div id="hello">
	<ul>
		<li>aaaaaaaaaaaaa</li>
		<li>bbbbbbbbbbbbb</li>
		<li class="abc">vvvvvvvvvvvvv</li>
		<li>ccccccccccccc</li>
		<li>ddddddddddddd</li>
	</ul>
</div>
</body>
</html>

